package iqq.ui.action;

import iqq.ui.view.ViewFactory;
import iqq.ui.view.rootpane.LoginProcRootPane;
import iqq.util.LanguageLoader;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import com.alee.laf.checkbox.WebCheckBox;
import com.alee.laf.combobox.WebComboBox;
import com.alee.laf.text.WebPasswordField;

public class LoginAction extends AbstractAction {

	private static final long serialVersionUID = -4961725864178291237L;

	public LoginAction() {
		super(LanguageLoader.getString("login"));
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		WebComboBox accoutCbx = (WebComboBox) getValue("account");
		WebPasswordField passwordFld = (WebPasswordField) getValue("password");
		WebCheckBox rePwdCkb = (WebCheckBox) getValue("repassword");
		WebComboBox statusCbx = (WebComboBox) getValue("status");

		System.out.println(accoutCbx.getSelectedItem());
		System.out.println(passwordFld.getPassword());
		
		ViewFactory.show(LoginProcRootPane.class);
	}

}
